<%--
  Created by IntelliJ IDEA.
  User: 赁佳
  Date: 2018/5/29
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.DriverManager" %><%--
  Created by IntelliJ IDEA.
  User: 赁佳
  Date: 2018/5/17
  Time: 22:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="edu.sctu.User" %>
<%@ page import="edu.sctu.DataBase" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--易错点 忘记加taglib指令引入--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>test</title>
    <style type="text/css">
        table {
            border-collapse: collapse;
        }

        td {
            border: 1px solid #000;
            padding: 10px;
        }
    </style>
</head>
<body>


<p><a href="userAdd.jsp">添加用户</a></p>
<p><a href="login.jsp">用户登录</a></p>

<table>
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>密码</td>
        <td></td>
    </tr>

    <%--易错点 ${userList}少${}--%>
    <c:forEach var="user" items="${userList}">

        <tr>
            <td>${user.id}</td>
            <td>${user.userName}</td>
            <td>${user.password}</td>
            <td><a href="/userEdit.jsp?id=${user.id}&userName=${user.userName}&password=${user.password}">编辑</a></td>
        </tr>
    </c:forEach>

</table>

</body>
</html>

